﻿using AutoMapper;
using Microsoft.Extensions.DependencyInjection;

namespace XieCan.Core.Mapper
{
  public static class AutoMapperExtension
  {
    public static IServiceCollection AddAutoMapperExt(this IServiceCollection services)
    {
      services.AddAutoMapper(typeof(AutoMapperExtension));
      _ = new MapperConfiguration(cfg =>
      {
        cfg.AddProfile<MapperProfile>();
      });
      return services;
    }
  }
}
